package com.stylefeng.guns.modular.system.dao;

import com.stylefeng.guns.modular.system.model.ArtificerMeans;
import com.stylefeng.guns.modular.system.model.ConsumerCollection;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * <p>
 * 用户收藏 Mapper 接口
 * </p>
 *
 * @author stylefeng
 * @since 2019-09-09
 */
public interface ConsumerCollectionMapper extends BaseMapper<ConsumerCollection> {

    List<ArtificerMeans> selectListByConsumerId(@Param("consumerId") Integer consumerId);

    List<ArtificerMeans> searchByConsumerIdArtificerId(@Param("consumerId") Integer consumerId,@Param("artificerId") Integer artificerId );

    void deleteCollection(@Param("consumerId") Integer consumerId,@Param("artificerId") Integer artificerId );

    @Update("update  biz_consumer_collection  set `status`=#{status} where artificerId=#{artificerId}  and customer_id=#{customerId}")
    void saveCollection(@Param("artificerId") Integer artificerId,@Param("customerId") Integer customerId,@Param("status") Integer status);
}
